package com.zrrd.controller;

import com.zrrd.pojo.Card;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author WanJl
 * @version 1.0
 * @title CardController
 * @description
 * @create 2024/1/29 14:34
 */
@RestController
@RequestMapping("/card")
public class CardController {
    /**
     * 3、嵌套POJO类型参数传递
     *  POJO类型里面包含其他POJO类型，嵌套POJO
     * @param card
     * @return
     */
    @RequestMapping("/add")
    @ResponseBody
    public Integer add(Card card){
        System.out.println(card);
        return 1;
    }
}
